#!encoding=utf-8
import os
import database
import config
from fileio import GetFileId

def ChkInvPic():
    print('此功能处于测试阶段，不提供实质操作！')
    db = database.CDatabase(config.DATABASE_NAME)
    lstPicInfos = db.GetTable('Pictures')
    for row in lstPicInfos:
        artistName = db.GetArtistName(row[1])
        if GetFileId( config.BACKUPS_FOLDER + '%s[%d]' % (artistName, row[2]) + '.jpg' ) <> row[0]:
            print( '%s[%d]' % (artistName, row[2]) + ' may be invalid' )
